package com.vvv.designpattern.bridge.abst;

import com.vvv.designpattern.bridge.function.RegisterLoginFuncInterface;
import com.vvv.designpattern.pojo.UserInfo;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

/**
 * @author vvv
 * @date 2023-11-16 15 04
 * discription
 */
public class RegisterLoginComponent extends AbstractRegisterLoginComponent{

    public RegisterLoginComponent(RegisterLoginFuncInterface funcInterface) {
        super(funcInterface);
    }

    @Override
    public String login(String account, String password) {
        return funcInterface.login(account, password);
    }

    @Override
    public String register(UserInfo userInfo) {
        return funcInterface.register(userInfo);
    }

    @Override
    public boolean checkUserExists(String username) {
        return funcInterface.checkUserExists(username);
    }

    @Override
    public String login3rd(HttpServletRequest request) {
        return funcInterface.login3rd(request);
    }

}
